Title Banner


Technical Q&A's


QTPC 11 - Low Mem Conditions, CFM and QuickTime for PPC (1-Aug-95)


Q We have a problem when we draw to an offscreen GWorld during a low memory condition (the system heap can't grow). The GWorld drawn contains digital noise. The same code works just fine in an 68K environment, but this problem appears when we have linked our application to use the PowerPlug codecs under PowerPC.

A QuickTime is unable to load the PowerPlug CFM library codec into the multifinder temp memory if MF temp memory can't grow (if the application heap has allocated all spare memory). This will lead to a situation where QuickTime will issue a noCodecErr. You should alway try to catch QuickTime generated errors, for instance, playback errors after each MoviesTask() using:

anErr = GetMoviesStatus(Movie theMovie, Track *problemTrack);

to get errors that occurred during playback.

Here's a possible workaround: launch one small app that has the QuickTimeLib (PowerPlug) CFM libraries statically linked in, so those are loaded (MF temp memory can grow). What this app then does is to launch the main application, and kill itself. The second app could try to grow to predefined size and handle low mem conditions in whatever way it wants, but the pre-defined CFM libraries are in memory by then.

CFM will never load CFM fragments into app heap; this is because there's a global registry of CFM libraries present. If another application registers to a CFM library present in an app heap that goes away, this will cause errors related to a CFM library no longer available in memory. In the case of 68K, the codecs are components, and the component manager will always try to load components into the application heap if the system heap does not have any available space.

Technical Support
Technical Q&As
Previous Question | Contents | Next Question

Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help